package com.itHaipeng.factory;

import com.itHaipeng.service.IService;
import com.itHaipeng.service.impl.IServiceImpl;
import org.jetbrains.annotations.NotNull;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class IServiceImplFactory {
    private static final ApplicationContext applicationContext=new ClassPathXmlApplicationContext("bean.xml");
    public static @NotNull IService getIServiceImpl(){
        IService iservice = applicationContext.getBean("iservice", IService.class);
        return iservice;
    }
}
